package com.joe.utils;

import java.util.ArrayList;
import java.util.Collection;
import java.util.List;

/**
 * Created by joe on 2019/1/20
 */
public abstract class CollectionUtils {

    /**
     * 集合是否为空
     */
    public static boolean isEmpty(Collection<?> collection) {
        return collection == null || collection.size() == 0;
    }

    static class ListUtils extends CollectionUtils {

        static <T> List<T> union(List<T> superList, List<T> subList) {
            List<T> result = new ArrayList<>(superList);
            result.addAll(subList);
            return result;
        }

    }

    static class SetUtils extends CollectionUtils {

    }

}
